const Http = require('./http');
const Api= require('./api');

class UserService {
  static getIndexInfo(openid) {
    return Http.request({
    	url: Api.getIndexInfo,
    	data: {openid:openid}
    });
  }

  static userRed(openid,page) {
  	return Http.request({
    	url: Api.userRed,
    	data: {openid:openid,page:page}
    });
  }

  static drawPrize(data) {
    return Http.request({
      url: Api.drawPrize,
      data: data
    });
  }

  static withdraw(money,openid) {
    return Http.request({
      url: Api.withdraw,
      data: {money:money,openid:openid}
    });
  }

  static userRebate(openid,page) {
  	return Http.request({
    	url: Api.userRebate,
    	data: {openid:openid,page:page}
    });
  }

  static login(data) {
    return Http.request({
      url: Api.login,
      data: data
    });
  }

}
module.exports = UserService;